Document #:include support in file-based apps#53350
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/27329bc4-87c0-469b-b146-55d906707455 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update article on file-based apps with include syntax
Document Apr 22, 2026
#:include support in file-based apps
gewarren
reviewed
Apr 22, 2026
Contributor
|
@copilot Please respond to feedback. |
Reordered the list of supported directives for clarity and moved the `#:project` section to a new position.
Removed duplicate section for the `#:include` directive in the documentation.
gewarren
reviewed
Apr 22, 2026
gewarren
approved these changes
Apr 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the file-based apps documentation to cover the newly supported #:include directive so developers can split a file-based app across multiple source files.
Changes:
- Adds
#:includeto the supported directives list. - Adds a new
#:includesubsection with examples and an availability note.
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/a2dfc33b-80ca-4bce-a649-cb0f6ef97058 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/a2dfc33b-80ca-4bce-a649-cb0f6ef97058 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/a2dfc33b-80ca-4bce-a649-cb0f6ef97058 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/a2dfc33b-80ca-4bce-a649-cb0f6ef97058 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Contributor
Author
adegeo
reviewed
Apr 29, 2026
Contributor
|
Feature PR is closed, so abandoning this PR. |
Member
|
This feature landed in 10.0.300 last week so reopening. |
Contributor
|
@copilot Please respond to all feedback. |
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Contributor
Author
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/9e2da8dc-710b-4505-890e-2e264be1aa13 Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
gewarren
reviewed
May 20, 2026
DamianEdwards
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The file-based apps article was missing the new
#:includedirective introduced with .NET 11 Preview 3 and now available in .NET SDK 10.0.300. This update adds directive coverage and clarifies how included files participate in compilation.Supported directives
#:includeto the top-level list of supported file-based app directives.New
#:includedirective section#:include.#:includeheading: .NET 11 Preview 3 and .NET SDK 10.0.300+.shared/**/*.cs).$(MSBuildProjectName).*.cs).Included item behavior clarification
*.cs->Compile*.resx->EmbeddedResource*.json->None*.razor->Content.csfiles are compiled as part of the same app and can add declarations, but can't add top-level statements.Internal previews
Internal previews